package com.example.demo.day.config.learn.design.bridge.p2;

public class p2Test {

    public static void main(String[] args) {
        Color yellow = new Yellow();
        Color red = new Red();
        Bag bag1 = new HandBag();
        bag1.setColor(yellow);
        System.out.println(bag1.getName());
        Bag bag2 = new Wallet();
        bag2.setColor(red);
        System.out.println(bag2.getName());
    }
}
